package com.senthink.gl.business.userlog.enums;

import lombok.Getter;

import java.util.LinkedHashSet;
import java.util.Set;

/**
 * 操作日志 操作详情枚举类
 * @author yuanpeng@senthink.com
 * @data 2018-01-31 14:36
 */

@Getter
public enum LogDetailEnum {

    DEFAULT(0, "默认详情"),

    CREATE_AREA(1, "新建区域"),

    CREATE_DEVICE(2, "新建设备"),

    CREATE_POLICIES(3, "新建策略"),

    RESET_PASSWORD(4, "重置密码"),

    LOGIN_IN(5, "登录系统"),

    LOGIN_OUT(6, "登出系统"),

    UPDATE_DEVICE(7, "编辑设备"),

    DELETE_DEVICE(8, "删除设备"),

    IMPORT_DEVICE(9, "批量导入设备"),

    BATCH_EDIT_LOCATION(10, "批量修改位置信息"),

    BATCH_EDIT_AREA(11, "批量修改区域信息"),

    BATCH_CONTROL(12, "批量控制"),

    SINGLE_CONTROL(13, "单个控制"),

    DELETE_AREA(14, "删除区域"),

    UPDATE_AREA(15, "编辑区域"),

    UPDATE_POLICIES(16, "编辑策略"),

    DELETE_POLICIES(17, "删除策略"),

    DOWN_POLICIES(18, "下发应急策略"),

    CREATE_POLICIES_PARAM(19, "新建策略参数"),

    UPDATE_POLICIES_PARAM(20, "编辑策略参数"),

    DELETE_POLICIES_PARAM(21, "删除策略参数"),

    FORGET_PASSWORD(22, "忘记密码"),

    UPDATE_CENTER(23, "编辑个人中心信息"),

    UPDATE_USER(24, "编辑用户信息"),

    DELETE_USER(25, "删除用户信息"),

    CREATE_USER(26, "新建用户"),

    CREATE_OTHER_SYSTEM(27, "新建其他系统"),

    UPDATE_OTHER_SYSTEM(28, "编辑其他系统"),

    DELETE_OTHER_SYSTEM(29, "删除其他系统"),

    UPDATE_SYSTEM_CONFIG(30, "编辑系统参数"),

    ENABLE_USER(31, "禁用或启用用户"),

    BIND_AREA(32, "绑定区域"),

    BIND_DEVICE(33, "绑定设备"),

    CREATE_FAULT(34, "添加故障等级"),

    UPDATE_FAULT(35, "修改故障等级"),

    LINK_LIGHT(36, "关联灯杆"),

    DELETE_FAULT(37, "删除故障等级"),

    CONTROL_LOOP(38, "回路控制"),

    CREATE_ALARM_SET(39, "新建报警设置"),

    UPDATE_ALARM_SET(40, "编辑报警设置"),

    DELETE_ALARM_SET(41, "删除报警设置"),

    CREATE_PARK_DEVICE_TYPE(42, "新建报警设置"),

    UPDATE_PARK_DEVICE_TYPE(43, "编辑报警设置"),

    DELETE_PARK_DEVICE_TYPE(44, "删除报警设置"),

    CREATE_UPATE_INTEGRATE(45, "集成测试操作");

    public static final Set<String> set = new LinkedHashSet<>();

    static {
        for (LogDetailEnum enums : LogDetailEnum.values()) {
            if (enums != LogDetailEnum.DEFAULT) {
                set.add(enums.getDetail());
            }
        }
    }

    private Integer code;

    private String detail;

    LogDetailEnum(Integer code, String detail) {
        this.code = code;
        this.detail = detail;
    }
}
